﻿{extend name="public:base" /}

{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <a href="{:url('doInformation')}" class="btn btn-primary btn-lg">新增</a>

                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="iconfont icon-chevron-up"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <div class="row search-form">
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <select name="shop_id" class="form-control form-control-lg">
                                    <option value="">请选择门店</option>
                                    {volist name="shop_list" id="vo"}
                                    <option value="{$vo.id}" {:input('shop_id') == $vo.id ? 'selected' : ''}>{$vo.name}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>

                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <input placeholder="车牌/车架号/防伪流水号/联系方式" type="text" name="search_value" value="{:input('search_value')}" class="form-control form-control-lg">
                            </div>
                        </div>
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <button type="button" class="btn btn-primary btn-lg screen-btn">搜索</button>
                            </div>
                        </div>
                    </div>

                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>

                            <tr>
                                <th>所属门店</th>
                                <th>车牌</th>
                                <th>车架号</th>
                                <th>车型</th>
                                <th>年份</th>
                                <th>机器型号</th>
                                <th>防伪流水号</th>
                                <th>客户姓名 / 联系方式</th>
                                <th>安装日期</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo"}
                            <tr>
                                <td>{$vo.shop_id|getShopName}</td>
                                <td>{$vo.license_plate}</td>
                                <td>{$vo.vin}</td>
                                <td>{$vo.car_model}</td>
                                <td>{$vo.year}</td>
                                <td>{$vo.machine_model}</td>
                                <td>{$vo.serial_number}</td>
                                <td>{$vo.customer_name} / {$vo.customer_mobile}</td>
                                <td>{$vo.installation_date}</td>
                                <td class="project-actions">
                                    <a href="{:url('doInformation', ['id' => $vo.id])}" class="btn btn-white btn-sm"><i class="iconfont icon-edit"></i> 编辑 </a>
                                    <a href="{:url('delInformation', ['id' => $vo.id])}" class="btn btn-white btn-sm ajax-del"><i class="iconfont icon-trash"></i> 删除 </a>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                        {if !empty($list)}{$list->render()}{/if}
                    </div>

                </div>
            </div>
        </div>

    </div>
</div>

{/block}

